using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO
{
    /********************************BEGIN DanhSachCamThiDAO****************************************/
    ///<summary>
    /// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
    /// <para>Date:21/09/2010 46:01:44</para>
    /// <para>Class Name: DanhSachCamThiDAO</para>
    /// <para>Description: Class access to table DanhSachCamThi in database. Class for coder code here</para>
    ///</summary>


    public partial class DanhSachCamThiDAO
    {
        public DataSet SelectAllDSWithSinhVienByMonHocHocKyNamHoc(int MonHoc_ID, int HocKy_ID, int NamHoc_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = @"SELECT        DanhSachCamThi.DanhSachCamThi_ID, DanhSachCamThi.MonHoc_ID, DanhSachCamThi.NamHoc_ID, DanhSachCamThi.HocKy_ID, DanhSachCamThi.SinhVien_ID, 
                                 DanhSachCamThi.LyDoCamThi_ID, SinhVien.MaSinhVien, SinhVien.TenSinhVien, SinhVien.DiaChi, SinhVien.Email, SinhVien.SoCMND, SinhVien.DienThoai, 
                                 SinhVien.GioiTinh, SinhVien.NgaySinh, SinhVien.GhiChu, PhanNganhSinhVien.PhanNganhSinhVien_ID, NganhHoc.MaNganhHoc, NganhHoc.TenNganhHoc, 
                                 Khoa.MaKhoa, Khoa.TenKhoa, KhoaHoc.MaKhoaHoc, KhoaHoc.TenKhoaHoc, Khoa.Khoa_ID, LopSinhVien.LopSinhVien_ID, Lop.MaLop, Lop.TenLop, 
                                 Lop.Lop_ID
                              FROM            DanhSachCamThi INNER JOIN
                                 SinhVien ON DanhSachCamThi.SinhVien_ID = SinhVien.SinhVien_ID INNER JOIN
                                 PhanNganhSinhVien ON SinhVien.SinhVien_ID = PhanNganhSinhVien.SinhVien_ID INNER JOIN
                                 NganhHoc ON PhanNganhSinhVien.NganhHoc_ID = NganhHoc.NganhHoc_ID INNER JOIN
                                 Khoa ON NganhHoc.Khoa_ID = Khoa.Khoa_ID INNER JOIN
                                 LopSinhVien ON SinhVien.SinhVien_ID = LopSinhVien.SinhVien_ID INNER JOIN
                                 Lop ON LopSinhVien.Lop_ID = Lop.Lop_ID INNER JOIN
                                 KhoaHoc ON PhanNganhSinhVien.KhoaHoc_ID = KhoaHoc.KhoaHoc_ID ";
            cmd.CommandText += " WHERE DanhSachCamThi.MonHoc_ID=" + MonHoc_ID.ToString() + " AND DanhSachCamThi.HocKy_ID=" + HocKy_ID.ToString() + " AND DanhSachCamThi.NamHoc_ID=" + NamHoc_ID.ToString();
            return this.SelectDS(cmd);

        }
    }
    /*****************************************************************************************************/
    /**********************************END DanhSachCamThiDAO*****************************************/
    /*****************************************************************************************************/
}

